package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_share_bonus;

//DAO
public interface U_share_bonusMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_SHARE_BONUS  WHERE ID = #{id}")
	public ApiU_share_bonus findU_share_bonusById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_share_bonus")
	public List<ApiU_share_bonus> findU_share_bonuss();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_share_bonussByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_SHARE_BONUS (PHONE, CREATE_TIME, BONUS_DETAIL_ID, EXT1, EXT2, EXT3, EXT4, EXT5) VALUES (#{phone}, #{create_time}, #{bonus_detail_id}, #{ext1}, #{ext2}, #{ext3}, #{ext4}, #{ext5})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_share_bonus(ApiU_share_bonus u_share_bonus);

	// 修改
	@Update("UPDATE U_SHARE_BONUS SET PHONE = #{phone}, CREATE_TIME = #{create_time}, BONUS_DETAIL_ID = #{bonus_detail_id}, EXT1 = #{ext1}, EXT2 = #{ext2}, EXT3 = #{ext3}, EXT4 = #{ext4}, EXT5 = #{ext5} WHERE ID = #{id}")
	public int updateU_share_bonus(ApiU_share_bonus u_share_bonus);

	// 删除
	@Delete("DELETE FROM U_SHARE_BONUS  WHERE ID = #{id}")
	public int deleteU_share_bonus(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
